翻訳と辞書
Words near each other
・ Double Diamond Burton Pale Ale
・ Double Diamond Dude Ranch Dining Hall
・ Double Diamond International
・ Double diffusive convection
・ Double digging
・ Double digital option
・ Double diode triode
・ Double dip
・ Double Dip (confectionery)
・ Double direct election
・ Double disc (Pictish symbol)
・ Double discography
・ Double Discount
・ Double disk
・ Double Disk Diffusion Test
Double dispatch
・ Double dissolution
・ Double Ditch
・ Double Divas
・ Double diversion
・ Double Door
・ Double Door (film)
・ Double Dose
・ Double Dose (Hot Tuna album)
・ Double Dose (Tela album)
・ Double Double Bonus
・ Double Down
・ Double Down (2001 film)
・ Double Down (sandwich)
・ Double Down Live Tour


Dictionary Lists
翻訳と辞書 辞書検索 [ 開発暫定版 ]
スポンサード リンク

Double dispatch : ウィキペディア英語版
Double dispatch

In software engineering, double dispatch is a special form of multiple dispatch, and a mechanism that dispatches a function call to different concrete functions depending on the runtime types of two objects involved in the call. In most object-oriented systems, the concrete function that is called from a function call in the code depends on the dynamic type of a single object and therefore they are known as single dispatch calls, or simply virtual function calls.
==Examples==
Double dispatch is useful in situations where the choice of computation depends on the runtime types of its arguments. For example, a programmer could use double dispatch in the following situations:
* ''Sorting a mixed set of objects'' algorithms require that a list of objects be sorted into some canonical order. Deciding if one element comes before another element requires knowledge of both types and possibly some subset of the fields.
* ''Adaptive collision algorithms'' usually require that collisions between different objects be handled in different ways. A typical example is in a game environment where the collision between a spaceship and an asteroid is computed differently from the collision between a spaceship and a spacestation.〔More Effective C++ by Scott Meyers(Addison-Wesley, 1996)〕
* ''Painting algorithms'' that require the intersection points of overlapping sprites be rendered in a different manner.
* ''Personnel management'' systems may ''dispatch'' different types of jobs to different personnel. A schedule algorithm that is given a person object typed as an accountant and a job object typed as engineering rejects the scheduling of that person for that job.
* ''Event handling'' systems that use both the event type and the type of the receptor object in order to call the correct event handling routine.
* ''Lock and key'' systems where there are many types of locks and many types of keys and every type of key opens multiple types of locks. Not only do you need to know the types of the objects involved, but the subset of "information about a particular key that are relevant to seeing if a particular key opens a particular lock" is different between different lock types.

抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)
ウィキペディアで「Double dispatch」の詳細全文を読む



スポンサード リンク
翻訳と辞書 : 翻訳のためのインターネットリソース

Copyright(C) kotoba.ne.jp 1997-2016. All Rights Reserved.